package com.sxt;

import java.awt.*;
import java.util.ArrayList;
import java.util.List;

public class GameUtils {

    //键盘方向控制（定义4个静态布尔变量表示4个方向）
    static boolean UP=false;
    static boolean DOWN=false;
    static boolean LEFT=false;
    static boolean RIGHT=false;

    //记录分数
    static int count = 0;

    //关卡等级
    static int level = 0;

    //存储敌方鱼类集合
    public static List<Enamy>EnamyList = new ArrayList<>();


    //加载背景图片资源
    public static Image bigimg = Toolkit.getDefaultToolkit().createImage("images/sea.jpg");
    //敌方鱼类
    public static Image enamyl_img = Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish1_r.jpg");
    public static Image enamyr_img = Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish1_l.jpg");
    public static Image enamyl_2img = Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish2_r.jpg");
    public static Image enamyr_2img = Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish2_l.jpg");
    public static Image enamyl_3img = Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish3_r.jpg");
    public static Image enamyr_3img = Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish3_l.jpg");
    public static Image bossimg = Toolkit.getDefaultToolkit().createImage("images/enemyFish/boss.jpg");
    //我方鱼类
    public static Image MyFishimg_L = Toolkit.getDefaultToolkit().createImage("images/myFish/myfish_left.jpg");
    public static Image MyFishimg_R = Toolkit.getDefaultToolkit().createImage("images/myFish/myfish_right.jpg");


    //绘制文具的工具类
    public static void drawWord(Graphics g,String str,Color color,int size,int x,int y)
    {
        g.setColor(color);
        g.setFont(new Font("仿宋",Font.BOLD,size));
        g.drawString(str,x,y);
    }
}
